﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProgrammingEducationSystem.Models
{
    //课时
    public class CourseHour
    {
        public Guid Id { get; set; }
        [Required(ErrorMessage = "课时名称不可为空")]
        public string Name { get; set; }

        [ForeignKey(nameof(Course))]
        [Required(ErrorMessage = "课程Id不可为空")]
        public Guid CourseId { get; set; }
        public Course Course { get; set; }

        [Required(ErrorMessage = "教室Id不可为空")]
        public Guid ClassRoomId { get; set; }
        public ClassRoom ClassRoom { get; set; }

        [Required(ErrorMessage = "上课时间不可为空")]
        public string ClassTime { get; set; }

    }
}
